package com.linln.admin.pcs.api;


import com.linln.admin.pcs.service.VerifyLogService;
import com.linln.admin.system.service.AppService;
import com.linln.common.utils.ResultVoUtil;
import com.linln.common.vo.ResultVo;
import com.linln.component.actionLog.annotation.EntityParam;
import com.linln.modules.system.domain.Project;
import com.linln.modules.system.repository.ProjectRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.thymeleaf.spring5.view.ThymeleafViewResolver;

import java.util.List;


/**
 * 服务项目管理
 */
@RestController
@RequestMapping("/api/project/")
public class ProjectApiController {

    @Autowired
    private AppService appService;
    @Autowired
    private  ProjectRepository projectRepository;
    @Autowired
    private VerifyLogService verifyLogService;
    @Autowired
    private ThymeleafViewResolver thymeleafViewResolver;



    /**
     * 专业陪护项目列表页面
     */
    @GetMapping("list")
    public ResultVo index(Model model, @EntityParam Project project) {
        List<Project> list =  projectRepository.findAll();
        return ResultVoUtil.success("success", list);
    }









}
